<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>i2srx: xi2srx_intr_example.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">i2srx
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xi2srx__intr__example_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xi2srx_intr_example.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>This file contains a example for using the I2S receiver hardware device and I2S receiver driver using interrupt mode.This example assumes that the interrupt controller is also present as a part of the system. </p>
<pre> MODIFICATION HISTORY:</pre><pre>Ver     Who     Date            Changes
</p>
<hr/>
<p>
1.0     kar     01/25/18        First release</pre><pre></pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:abda2a9bf51004e4536e4f737e898786a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xi2srx__intr__example_8c.html#abda2a9bf51004e4536e4f737e898786a">I2sRxIntrExample</a> (INTC *IntcInstancePtr, <a class="el" href="struct_x_i2s___rx.html">XI2s_Rx</a> *I2sRxInstancePtr, u16 DeviceId, u16 IntrId)</td></tr>
<tr class="memdesc:abda2a9bf51004e4536e4f737e898786a"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function does a minimal test on the I2S receiver device and driver as a design example.  <a href="#abda2a9bf51004e4536e4f737e898786a">More...</a><br/></td></tr>
<tr class="separator:abda2a9bf51004e4536e4f737e898786a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa93015c1480d01e06e513a751f5524a5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xi2srx__intr__example_8c.html#aa93015c1480d01e06e513a751f5524a5">I2sRxDisableIntr</a> (INTC *IntcInstancePtr, u16 IntrId)</td></tr>
<tr class="memdesc:aa93015c1480d01e06e513a751f5524a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function disables the interrupts for the I2S receiver.  <a href="#aa93015c1480d01e06e513a751f5524a5">More...</a><br/></td></tr>
<tr class="separator:aa93015c1480d01e06e513a751f5524a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a14b015b1bff0d9e1a5001b95aab525a5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xi2srx__intr__example_8c.html#a14b015b1bff0d9e1a5001b95aab525a5">I2sRxAesBlockCmplIntrHandler</a> (void *CallBackRef)</td></tr>
<tr class="memdesc:a14b015b1bff0d9e1a5001b95aab525a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is the handler which performs processing for the I2S receiver.  <a href="#a14b015b1bff0d9e1a5001b95aab525a5">More...</a><br/></td></tr>
<tr class="separator:a14b015b1bff0d9e1a5001b95aab525a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1bc767bcf68b94b83ebc84cae6dc46ba"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xi2srx__intr__example_8c.html#a1bc767bcf68b94b83ebc84cae6dc46ba">I2sRxOvrflwIntrHandler</a> (void *CallBackRef)</td></tr>
<tr class="memdesc:a1bc767bcf68b94b83ebc84cae6dc46ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is the handler which performs processing for the I2S receiver.  <a href="#a1bc767bcf68b94b83ebc84cae6dc46ba">More...</a><br/></td></tr>
<tr class="separator:a1bc767bcf68b94b83ebc84cae6dc46ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a840291bc02cba5474a4cb46a9b9566fe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xi2srx__intr__example_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
<tr class="memdesc:a840291bc02cba5474a4cb46a9b9566fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function is the main function of the I2S receiver example using Interrupts.  <a href="#a840291bc02cba5474a4cb46a9b9566fe">More...</a><br/></td></tr>
<tr class="separator:a840291bc02cba5474a4cb46a9b9566fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a14b015b1bff0d9e1a5001b95aab525a5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void I2sRxAesBlockCmplIntrHandler </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>CallBackRef</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is the handler which performs processing for the I2S receiver. </p>
<p>It is called from an interrupt context when the I2S receiver receives a AES Block Complete Interrupt.</p>
<p>This handler provides an example of how to handle I2S receiver interrupts but is application specific.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CallBackRef</td><td>is a pointer to the callback function</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>Referenced by <a class="el" href="xi2srx__intr__example_8c.html#abda2a9bf51004e4536e4f737e898786a">I2sRxIntrExample()</a>.</p>

</div>
</div>
<a class="anchor" id="aa93015c1480d01e06e513a751f5524a5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void I2sRxDisableIntr </td>
          <td>(</td>
          <td class="paramtype">INTC *&#160;</td>
          <td class="paramname"><em>IntcInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>IntrId</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function disables the interrupts for the I2S receiver. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">IntcInstancePtr</td><td>is a reference to the Interrupt Controller driver Instance. </td></tr>
    <tr><td class="paramname">IntrId</td><td>is XPAR_&lt;INTC_instance&gt;_&lt;i2s_rx_instance&gt;_VEC_ID value from xparameters.h.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

</div>
</div>
<a class="anchor" id="abda2a9bf51004e4536e4f737e898786a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int I2sRxIntrExample </td>
          <td>(</td>
          <td class="paramtype">INTC *&#160;</td>
          <td class="paramname"><em>IntcInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_x_i2s___rx.html">XI2s_Rx</a> *&#160;</td>
          <td class="paramname"><em>I2sRxInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>DeviceId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>IntrId</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function does a minimal test on the I2S receiver device and driver as a design example. </p>
<p>The purpose of this function is to illustrate how to use the <a class="el" href="struct_x_i2s___rx.html" title="The XI2s Receiver driver instance data. ">XI2s_Rx</a> component. It initializes a I2S receiver and then sets it up such that a periodic interrupt is generated.</p>
<p>This function uses interrupt driven mode of the I2S receiver.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">IntcInstancePtr</td><td>is a pointer to the Interrupt Controller driver Instance </td></tr>
    <tr><td class="paramname">I2sRxInstancePtr</td><td>is a pointer to the <a class="el" href="struct_x_i2s___rx.html" title="The XI2s Receiver driver instance data. ">XI2s_Rx</a> driver Instance </td></tr>
    <tr><td class="paramname">DeviceId</td><td>is the XPAR_&lt;i2s_rx_instance&gt;_DEVICE_ID value from xparameters.h </td></tr>
    <tr><td class="paramname">IntrId</td><td>is XPAR_&lt;INTC_instance&gt;_&lt;i2s_rx_instance&gt;_INTERRUPT_INTR value from xparameters.h</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS if the Test is successful, otherwise XST_FAILURE </dd></dl>

<p>References <a class="el" href="struct_x_i2s___rx.html#a7657d091fcc3dd42b0a8d86a1713b18f">XI2s_Rx::Config</a>, <a class="el" href="xi2srx__intr__example_8c.html#a14b015b1bff0d9e1a5001b95aab525a5">I2sRxAesBlockCmplIntrHandler()</a>, <a class="el" href="xi2srx__intr__example_8c.html#a1bc767bcf68b94b83ebc84cae6dc46ba">I2sRxOvrflwIntrHandler()</a>, <a class="el" href="group__i2srx.html#ga4d444eaa5a0dd7d980c0d216b3382260">XI2s_Rx_CfgInitialize()</a>, <a class="el" href="group__i2srx.html#ggace941535376f24ef90b44f160f55b70ea0df7f22d4a2d5f2f1dbf9305443194e1">XI2S_RX_CHMUX_XI2S_01</a>, <a class="el" href="group__i2srx.html#ga3a853463222fc023817337626e04ea1a">XI2s_Rx_Enable()</a>, <a class="el" href="group__i2srx.html#ga7089f6d78ab940b47ac4e63cc9de876d">XI2S_RX_GINTR_EN_MASK</a>, <a class="el" href="group__i2srx.html#gga73cea697b9b2b7edb411ac4ecf01b349ad5a32351d829855baf3f691a3718d176">XI2S_RX_HANDLER_AES_BLKCMPLT</a>, <a class="el" href="group__i2srx.html#gga73cea697b9b2b7edb411ac4ecf01b349adbc31f3ef63cffa075c18ad2a1288b0d">XI2S_RX_HANDLER_AUD_OVRFLW</a>, <a class="el" href="group__i2srx.html#gafa37ac42887b7ca3d17a5a48af43c3d1">XI2S_RX_INTR_AES_BLKCMPLT_MASK</a>, <a class="el" href="group__i2srx.html#gacf7d542116f93c176f729165c0c0ab46">XI2S_RX_INTR_AUDOVRFLW_MASK</a>, <a class="el" href="group__i2srx.html#ga595ca2872d1b5b59f05a229b3a28fd86">XI2s_Rx_IntrEnable()</a>, <a class="el" href="group__i2srx.html#gaca17a3387ef6bb0acdcfd20b94c0b7b1">XI2s_Rx_IntrHandler()</a>, <a class="el" href="group__i2srx.html#ga86fad2b52bbb42c12f21c72463a614b5">XI2s_Rx_LookupConfig()</a>, <a class="el" href="group__i2srx.html#ga522d6260d91826f18572844fb0fbf39d">XI2s_Rx_SetChMux()</a>, <a class="el" href="group__i2srx.html#gac365d1ba8ad9aca6ed6ebde4be5da1be">XI2s_Rx_SetHandler()</a>, and <a class="el" href="group__i2srx.html#ga6b26d3fc18f6a8a65f2a55eb94300aac">XI2s_Rx_SetSclkOutDiv()</a>.</p>

<p>Referenced by <a class="el" href="xi2srx__intr__example_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main()</a>.</p>

</div>
</div>
<a class="anchor" id="a1bc767bcf68b94b83ebc84cae6dc46ba"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void I2sRxOvrflwIntrHandler </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>CallBackRef</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is the handler which performs processing for the I2S receiver. </p>
<p>It is called from an interrupt context when the I2S receiver receives a Underflow Interrupt.</p>
<p>This handler provides an example of how to handle I2S receiver interrupts but is application specific.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CallBackRef</td><td>is a pointer to the callback function</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>Referenced by <a class="el" href="xi2srx__intr__example_8c.html#abda2a9bf51004e4536e4f737e898786a">I2sRxIntrExample()</a>.</p>

</div>
</div>
<a class="anchor" id="a840291bc02cba5474a4cb46a9b9566fe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function is the main function of the I2S receiver example using Interrupts. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None.</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>XST_SUCCESS to indicate success, else XST_FAILURE to indicate a Failure.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xi2srx__intr__example_8c.html#abda2a9bf51004e4536e4f737e898786a">I2sRxIntrExample()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
